{% extends "home.html" %}
{% load pagination_tags %}

{% block title %} References - {{ block.super }} {% endblock %}

{% block ads%}
{% endblock %}

{% block content %}

<div class="row">
<div class="span12">
<ul class="breadcrumb">
  <li><a class="active" href="#">References</a> <span class="divider">/</span></li>
</ul>
</div>

<div class="span12">
<table class="bordered-table zebra-striped">
 <thead>
 <tr>
   <th>Type</th>
   <th>Title</th>
   <th>Author</th>
   <th>Publisher</th>
   <th>Publication date</th>
   <th>Actions</th>
</tr>
</thead>

<tbody>

{% autopaginate bookreferences 4 %}
{% for bookref in bookreferences %}
<tr>
     <td><img class="thumbnail" src="{{ MEDIA_URL }}img/book.png"  width="25" height="25" alt=""></td>
     <td>{{ bookref.title }}</td>
     <td>{{ bookref.author }}</td>
     <td>{{ bookref.publisher }}</td>
     <td>{{ bookref.publication_date }}</div>
     <td><a class="btn small" 
          href="{% url book_update book_id=bookref.id dontvalidate='yes'%}">
         Update</a> 
         <a class="btn small" 
          href="{% url book_addnote book_id=bookref.id dontvalidate='yes'%}">
         Add note</a> 
     </td>

</tr>
{% endfor %}
<tr><td colspan="6"> {% paginate %} </td></tr>
</tbody>
</table>

{% if articlereferences %}
<table class="bordered-table zebra-striped">
<thead>
 <tr>
   <th>Type</th>
   <th>Title</th>
   <th>Author</th>
   <th>Journal</th>
   <th>Publication date</th>
   <th>Actions</th>
</tr>
</thead>

<tbody>
{% autopaginate articlereferences 4 %}

{% for articleref in articlereferences %}

<tr>
     <td><img class="thumbnail" src="{{ MEDIA_URL }}img/article.png" width="25" height="25" alt=""> </td>
     <td>{{ articleref.title }}</td>
     <td>{{ articleref.author }}</td>
     <td>{{ articleref.journal }}</td>
     <td>{{ articleref.publication_date }}</div>
     <td><a class="btn small" 
          href="{% url article_update article_id=articleref.id dontvalidate='yes'%}">
         Update</a> 
         <a class="btn small" 
          href="{% url article_addnote article_id=articleref.id dontvalidate='yes'%}">
         Add note</a> 
     </td>

</tr>

{% endfor %}

<tr><td colspan="6"> {% paginate %} </td></tr>
</tbody>
</table>

{% endif %}
</div>

</div> 


{% endblock %}

